#include<stdio.h>
#include<math.h>
int main()
{
    int a,b=1,n=-1,c;
    while(n<0){
    printf("Input n:");
    scanf("%d",&n);}
    for(a=1;a<=n;a++)
    {
    b=b*a;}
printf("\nwith n=%d \nwe have:\n    +n!=%d\n",a,b);
    while((c!=1)&&(c!=2)){
			   printf("\nDo you wanna continue(1=Y/2=N):");
			   scanf("%d",&c);
			   switch(c){
			   case 1: 
			   		main();
	   		    case 2:
					 printf("Goodbye%c\n",1);
					 printf("Press any key to exit.....");
					 getch();
					 return;
			 default:
			 		 printf("\nYou must choose 1 or 2");}}
}
